package com.cqw.commontest.view;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

/**
 * @Author: caoqingwen
 * @CreateTime: 2021-05-27 11:24
 * @Description:
 */
public class ViewTest1 {

    public static void main(String[] args) {
        Map<String, Object> map = new HashMap<>();
        map.put("name", "张三");

        Iterator<Map.Entry<String, Object>> iterator = map.entrySet().iterator();

        while (iterator.hasNext()) {
            Map.Entry<String, Object> next = iterator.next();
            String key = next.getKey();
            System.out.println(key);
            Object value = next.getValue();
            System.out.println(value);
        }


    }


}
